//
//  BDFaceBaseViewController.h
//  FaceSDKSample_IOS
//
//  Created by 阿凡树 on 2017/5/23.
//  Copyright © 2017年 Baidu. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "BDFaceCircleView.h"
#import "BDFaceCycleProgressView.h"
#import "BDFaceRemindAnimationView.h"
#import <IDLFaceSDK/IDLFaceSDK.h>
#import <AVFoundation/AVFoundation.h>
#import "BDFaceProgressHUD.h"

typedef enum : NSUInteger {
    CommonStatus,
    PoseStatus,
    occlusionStatus
} WarningStatus;

@interface BDFaceBaseViewController : UIViewController

/**
 * 设定使用前置摄像头或者后置摄像头
 * AVCaptureDevicePositionFront 前置摄像头(默认)
 * AVCaptureDevicePositionBack 后置摄像头
 */
@property (nonatomic, readwrite, assign) AVCaptureDevicePosition position;

// 是否开启提醒音，0：有声，1：无声
@property (nonatomic, assign) BOOL sound;

// 是否展示右上角声音按钮，0：无图标，1：有图标
@property (nonatomic, assign) BOOL soundEnable;

// 提示文字颜色
@property (nonatomic, strong) UIColor * _Nullable textColor;

// 识别页面背景颜色
@property (nonatomic, strong) UIColor * _Nullable backgroundImageColor;

// 人脸采集框颜色
@property (nonatomic, strong) UIColor * _Nullable roundColor;

// 识别成功时采集框颜色
@property (nonatomic, strong) UIColor * _Nullable roundSuccessColor;

// 底部版权文字内容
@property (nonatomic, copy) NSString * _Nullable bottomText;

// 底部版权文字颜色
@property (nonatomic, strong) UIColor * _Nullable bottomTextColor;

// 是否展示底部背景图片
@property (nonatomic, assign) BOOL showBottomImage;

// 是否返回动作人像信息
@property (nonatomic, assign) BOOL otherImage;

// 是否返回原图片信息
@property (nonatomic, assign) BOOL originalImage;

// 提示文字文案
@property (nonatomic, strong) NSDictionary * _Nonnull tipsDictionary;

// 显示切换摄像头按钮
@property (nonatomic, assign) BOOL switchCameraEnable;

// 采集完成之后是否直接返回
@property (nonatomic, assign) BOOL resultBackEnable;

@property (nonatomic, copy) void(^ _Nullable closeBlock)(NSString * _Nonnull code, NSArray * _Nullable images);

// ===================================================

@property (nonatomic, readwrite, assign) BOOL hasFinished;
/**
 *  视频i流回显view
 */
@property (nonatomic, readwrite, retain) UIImageView * _Nullable displayImageView;

/**
 *  人脸预览view ，最大预览框之内，最小预览框之外，根据该view 提示离远离近
 */
@property (nonatomic, readwrite, assign) CGRect previewRect;

/**
 * 人脸检测view，与视频流rect 一致
 */
@property (nonatomic, readwrite, assign) CGRect detectRect;

/**
 *  进度条view，活体检测页面
 */
@property (nonatomic, readwrite, retain) BDFaceCycleProgressView * _Nullable circleProgressView;

/*
 *  动作活体动画
 */
@property (nonatomic,readwrite,retain) BDFaceRemindAnimationView * _Nullable remindAnimationView;

- (void)faceProcesss:(UIImage *_Nullable)image;

- (void)closeAction:(UIButton *)button;

- (void)onAppWillResignAction;
- (void)onAppBecomeActive;

- (void)warningStatus:(WarningStatus)status warning:(NSString * _Nullable)warning;
- (void)singleActionSuccess:(BOOL)success;

@end
